<?php $img_err=Common::getImageError();  ?>
<?php $this->renderPartial("application.views.layouts._menu");?>
<div class="SK">
    <strong class="do font14">SỰ KIỆN TRONG GAME</strong><br>
    <?php foreach($event as $key=>$value){ ?>
        <a class="chu_SK" href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>3)); ?>"><img width="9" height="9" class="kc_SK" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-sukien-tieude.gif"><?php echo $value['title']; ?><br></a>
        <?php } ?>
    <a class="xanh" href="<?php echo Url::createUrl("home/event") ?>"><strong>Sự kiện khác »</strong></a>
</div>
<h2><strong>GAME ONLINE</strong></h2>
<?php foreach($data_gameonl as $key=>$value){ ?>    

    <div class="Game_nd">
        <div class="Game_nd_left">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>1)); ?>"><img onError="this.src='<?php echo $img_err; ?>'" width="65" height="65" alt="" src="<?php echo Common::getImage($value['picture'],"game",$value['create_date'],''); ?>"></a>
        </div>
        <div class="Game_nd_right">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>1)); ?>"><h3><?php echo $value['title']; ?></h3></a>
            <p><?php echo $value['introtext']; ?></p>
            <a href="#"><img class="kc_Game" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb_icon_dowload.png"></a><a class="do" href="<?php echo Yii::app()->params['url_mtop']."fileGame/download?gameId=".$value['id']."&userId=".$_SESSION['userId']; ?>">Tải miễn phí</a> (<?php echo $value['download']; ?> lượt tải)
        </div>
        <div class="both"></div>
    </div>
    <?php } ?>
<div class="them"><a class="xam" href="<?php echo Url::createUrl("home/gameOnline") ?>">Game online khác »</a></div>

<h2><strong>GAME OFFLINE</strong></h2>
<?php  foreach($data_gameoff as $key=>$value){ ?>    
    <div class="Game_nd">
        <div class="Game_nd_left">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>1)); ?>"><img onError="this.src='<?php echo $img_err; ?>'" width="65" height="65" alt="" src="<?php echo Common::getImage($value['picture'],"game",$value['create_date'],''); ?>"></a>
        </div>
        <div class="Game_nd_right">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>1)); ?>"><h3><?php echo $value['title']; ?></h3></a>
            <p><?php echo $value['introtext']; ?></p>
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>1)); ?>"><img class="kc_Game" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb_icon_dowload.png"></a><a class="do" href="<?php echo Yii::app()->params['url_mtop']."fileGame/download?gameId=".$value['id']."&userId=".$_SESSION['userId']; ?>">Tải miễn phí</a> (<?php echo $value['download']; ?> lượt tải)
        </div>
        <div class="both"></div>
    </div> 
    <?php } ?>
<div class="them"><a class="xam" href="<?php echo Url::createUrl("home/gameOffline") ?>">Game offline khác »</a></div>
<h2><strong>ỨNG DỤNG</strong></h2>

<?php foreach($data_app as $key=>$value){ ?> 
    <div class="Game_nd">
        <div class="Game_nd_left">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>2)); ?>"><img onError="this.src='<?php echo $img_err; ?>'" width="65" height="65" alt="" src="<?php echo Common::getImage($value['picture'],"app",$value['create_date'],''); ?>"></a>
        </div>
        <div class="Game_nd_right">
            <a href="<?php echo Url::createUrl("home/detail",array("id"=>$value['id'],"type"=>2)); ?>"><h3><?php echo $value['title']; ?></h3></a>
            <p><?php echo $value['introtext']; ?></p>
            <a href="#"><img class="kc_Game" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb_icon_dowload.png"></a><a class="do" href="<?php echo Yii::app()->params['url_mtop']."fileApp/download?appId=".$value['id']."&userId=".$_SESSION['userId']; ?>">Tải miễn phí</a> (<?php echo $value['download']; ?> lượt tải)
        </div>
        <div class="both"></div>
    </div>
    <?php } ?>

<div class="them"><a class="xam" href="<?php  echo Url::createUrl("home/app") ?>">Ứng dụng khác »</a></div>
<h2><strong>CLIP SEXY</strong></h2>
<div class="Game_nd">
    <div class="Game_nd_left">
        <a href="#"><img width="90" height="55" onError="this.src='<?php echo $img_err; ?>'" alt="" src="<?php echo Common::getImageKkt($latest_clip['picture'],"video",$latest_clip['create_date'],''); ?>"></a>
    </div>
    <div class="Game_nd_right">
        <a href="<?php echo Url::createUrl("clip/detail",array("id"=>$latest_clip['id'],"alias"=>$latest_clip['alias'])); ?>"><h3><?php echo $latest_clip['title']; ?></h3></a>
        <a href="<?php echo Yii::app()->params['url_mtop']."fileApp/download?appId=3&userId=".$_SESSION['userId']; ?>"><img class="kc_Game" alt="<?php echo $latest_clip['title']; ?>" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb_icon_dowload.png"></a><a class="do" href="<?php echo Yii::app()->params['url_mtop']."fileApp/download?appId=3&userId=".$_SESSION['userId']; ?>">Tải miễn phí</a> (<?php echo $latest_clip['download']; ?> lượt tải)
    </div>
    <div class="both"></div>
</div>
<div>
    <ul>
    <?php foreach($data_clip as $key=>$value){ ?>
        <li>
            <a href="<?php echo Url::createUrl("clip/detail",array("id"=>$value['id'],"alias"=>$latest_clip['alias'])); ?>"><img width="15" height="13" class="kc_Game" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb_icon_clip.png"><?php echo $value['title']; ?></a>
        </li>
    <?php } ?>
    </ul>
</div>
<div class="them"><a class="xam" href="<?php echo Url::createUrl("clip/index");?>">Clip khác »</a></div>